package com.pn.service.impl;

import com.pn.entity.Place;
import com.pn.entity.Product;
import com.pn.entity.Result;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

import com.pn.mapper.PlaceMapper;
import com.pn.service.PlaceService;

import java.util.List;

@CacheConfig(cacheNames = "com.pn.service.impl.PlaceServiceImpl")
@Service
public class PlaceServiceImpl implements PlaceService {

    @Value("${file.access-path}")
    private String imagePath;

    @Resource
    private PlaceMapper placeMapper;

    @Cacheable(key = "'all:place'")
    @Override
    public List<Place> queryAllPlace() {
        return placeMapper.selectAllPlace();
    }
}
